package com.haotian.xml;

import java.util.List;

import org.apache.commons.lang3.builder.ToStringBuilder;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamImplicit;

@XStreamAlias("bean")
public class TestBean {
	@XStreamAlias("姓名")
	private String name;

	@XStreamAlias("年龄")
	private int age;

	@XStreamImplicit(itemFieldName = "bean2")
	private List<TestBean2> beans;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

	public List<TestBean2> getBeans() {
		return beans;
	}

	public void setBeans(List<TestBean2> beans) {
		this.beans = beans;
	}

	
	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}
	
}
